import { useSelector, useDispatch } from 'umi';
import { ITotoState } from './model';
import { useEffect } from 'react';

const TodoList = () => {
  const state = useSelector<{ todoList: ITotoState }, ITotoState>((state) => {
    return state.todoList;
  });
  const dispatch = useDispatch();
  useEffect(() => {
    dispatch({
      type: 'todoList/getTodoListAsync',
    });
  }, []);
  return <div>TodoList</div>;
};

export default TodoList;
